import { createApp } from 'vue';

import App from './App.vue';

import Message from '@/components/Message/index.vue';
import ant from '@/plugins/ant-ui';
import { setupAssets } from '@/plugins/assets';
import naive from '@/plugins/naive-ui';
import router from '@/router/index';
import store from '@/store/index';
import '@/plugins/performance';

import '@/permission';

const app = createApp(App);
const message = createApp(Message);

// 引入静态资源
setupAssets();
app.use(router);
app.use(store);
app.use(ant);
app.use(naive);

const messageEle = document.createElement('div');
const appEle = document.getElementById('app');
appEle?.appendChild(messageEle);
message.mount(messageEle);

app.mount('#app');